import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';

import {AppComponent} from './app.component';
import {NZ_I18N} from 'ng-zorro-antd/i18n';
import {zh_CN} from 'ng-zorro-antd/i18n';
import {registerLocaleData} from '@angular/common';
import zh from '@angular/common/locales/zh';
import {FormsModule} from '@angular/forms';
import {HTTP_INTERCEPTORS, HttpClient, HttpClientModule} from '@angular/common/http';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {RouterModule} from '@angular/router';
import {AppRoutingModule} from './app-routing.module';
import {HomeComponent} from './user/page/home/home.component';
import {PageNotFoundComponent} from './user/page/page-not-found/page-not-found.component';
import {AdminHomeComponent} from './admin/page/admin-home/admin-home.component';
import {NzLayoutModule} from 'ng-zorro-antd/layout';
import {NzBreadCrumbModule} from 'ng-zorro-antd/breadcrumb';
import {NzButtonModule} from 'ng-zorro-antd/button';
import {NzIconModule} from 'ng-zorro-antd/icon';
import {NzTypographyModule} from 'ng-zorro-antd/typography';
import {NzDividerModule} from 'ng-zorro-antd/divider';
import {NzMenuModule} from 'ng-zorro-antd/menu';
import {AdminHomeIndexComponent} from './admin/page/admin-home-index/admin-home-index.component';
import {NzCardModule} from 'ng-zorro-antd/card';
import {LoginComponent} from './user/page/login/login.component';
import {RegisterComponent} from './user/page/register/register.component';
import {IndexComponent} from './user/page/index/index.component';
import {NzInputModule} from 'ng-zorro-antd/input';
import {ReactiveFormsModule} from '@angular/forms';
import {CommonModule} from '@angular/common';
import {AdminUserComponent} from './admin/page/admin-user/admin-user.component';
import {NzGridModule} from 'ng-zorro-antd/grid';
import {NzModalModule} from 'ng-zorro-antd/modal';
import {NzInputNumberModule} from 'ng-zorro-antd/input-number';
import {NzUploadModule} from 'ng-zorro-antd/upload';
import {NzTableModule} from 'ng-zorro-antd/table';
import {NzMessageModule} from 'ng-zorro-antd/message';
import {UserHomeComponent} from './user/page/user-home/user-home.component';
import {UserCenterComponent} from './user/page/user-center/user-center.component';
import {NzSelectModule} from 'ng-zorro-antd/select';
import {AdminTagComponent} from './admin/page/admin-tag/admin-tag.component';
import {NzResultModule} from 'ng-zorro-antd/result';
import {NzPaginationModule} from 'ng-zorro-antd/pagination';
import {NzSpinModule} from 'ng-zorro-antd/spin';

import {TokenInterceptor} from './util/token.interceptor';
import {PermissionErrorComponent} from './user/page/permission-error/permission-error.component';
import {NzDatePickerModule} from 'ng-zorro-antd/date-picker';
import {NzTimePickerModule} from 'ng-zorro-antd/time-picker';
import {NzStatisticModule} from 'ng-zorro-antd/statistic';
import {NzCarouselModule} from 'ng-zorro-antd/carousel';
import {ChangePasswordComponent} from './user/page/change-password/change-password.component';
import {UserHeaderComponent} from './user/component/user-header/user-header.component';
import { NzCalendarModule } from 'ng-zorro-antd/calendar';
import { NzDrawerModule } from 'ng-zorro-antd/drawer';
import { NzBadgeModule } from 'ng-zorro-antd/badge';
import { NzAvatarModule } from 'ng-zorro-antd/avatar';
import {NzDropDownModule} from 'ng-zorro-antd/dropdown';
import { ContestRoomComponent } from './contest/page/contest-room/contest-room.component';
import { ContestHomeComponent } from './contest/page/contest-home/contest-home.component';
import { DiscussHomeComponent } from './discuss/page/discuss-home/discuss-home.component';
import { DiscussIndexComponent } from './discuss/page/discuss-index/discuss-index.component';
import { GenerateDiscussComponent } from './discuss/page/generate-discuss/generate-discuss.component';
import {MarkdownModule} from 'ngx-markdown';
import { NzAffixModule } from 'ng-zorro-antd/affix';
import { DiscussCellComponent } from './discuss/component/discuss-cell/discuss-cell.component';
import { AdminLoginComponent } from './admin/page/admin-login/admin-login.component';
import { ContestCardComponent } from './contest/component/contest-card/contest-card.component';

registerLocaleData(zh);

@NgModule({
  declarations: [
    AppComponent,
    HomeComponent,
    PageNotFoundComponent,
    AdminHomeComponent,
    AdminHomeIndexComponent,
    LoginComponent,
    RegisterComponent,
    IndexComponent,
    AdminUserComponent,
    UserHomeComponent,
    UserCenterComponent,
    AdminTagComponent,
    PermissionErrorComponent,
    ChangePasswordComponent,
    UserHeaderComponent,
    ContestRoomComponent,
    ContestHomeComponent,
    DiscussHomeComponent,
    DiscussIndexComponent,
    GenerateDiscussComponent,
    DiscussCellComponent,
    AdminLoginComponent,
    ContestCardComponent,

  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpClientModule,
    BrowserAnimationsModule,
    RouterModule,
    AppRoutingModule,
    NzLayoutModule,
    NzBreadCrumbModule,
    NzButtonModule,
    NzIconModule,
    NzTypographyModule,
    NzDividerModule,
    NzMenuModule,
    NzCardModule,
    NzInputModule,
    ReactiveFormsModule,
    CommonModule,
    FormsModule,
    NzGridModule,
    NzModalModule,
    NzInputNumberModule,
    NzUploadModule,
    NzTableModule,
    NzMessageModule,
    NzSelectModule,
    NzResultModule,
    NzPaginationModule,
    NzSpinModule,
    NzDatePickerModule,
    NzTimePickerModule,
    NzStatisticModule,
    NzCarouselModule,
    NzCalendarModule,
    NzDrawerModule,
    NzBadgeModule,
    NzAvatarModule,
    NzDropDownModule,
    MarkdownModule.forRoot({ loader: HttpClient }),
    NzAffixModule
  ],
  providers: [{provide: NZ_I18N, useValue: zh_CN}, {provide: HTTP_INTERCEPTORS, useClass: TokenInterceptor, multi: true}],
  bootstrap: [AppComponent]
})
export class AppModule {

}
